<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>消息通知 - 邦伴用户端</title>
  <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
  <style>
    :root {
      --primary: #ff7e2d;
      --primary-light: #fff3ea;
      --border: #f0f0f0;
      --text-main: #222;
      --text-sub: #888;
    }
    
    body {
      font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
      background-color: #f8f8f8;
      color: var(--text-main);
    }
    
    .app-container {
      width: 375px;
      height: 812px;
      margin: 0 auto;
      background: #fff;
      position: relative;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
      overflow-y: auto;
    }
    
    .primary-color {
      color: var(--primary);
    }
    
    .primary-bg {
      background-color: var(--primary);
    }
    
    .primary-light-bg {
      background-color: var(--primary-light);
    }
    
    .btn-primary {
      background-color: var(--primary);
      color: white;
    }
    
    .btn-outline {
      border: 1px solid var(--primary);
      color: var(--primary);
    }
    
    .tab-active {
      color: var(--primary);
      border-bottom: 2px solid var(--primary);
    }
    
    .notification-item {
      padding: 16px;
      border-bottom: 1px solid var(--border);
      background-color: white;
    }
    
    .notification-item.unread {
      background-color: var(--primary-light);
    }
    
    .notification-item.unread:before {
      content: "";
      display: block;
      width: 6px;
      height: 6px;
      background-color: var(--primary);
      border-radius: 50%;
      position: absolute;
      top: 16px;
      right: 16px;
    }
    
    .notification-icon {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: #f3f4f6;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-sub);
      margin-right: 12px;
      flex-shrink: 0;
    }
    
    .notification-icon.system {
      color: #3b82f6;
    }
    
    .notification-icon.order {
      color: var(--primary);
    }
    
    .notification-icon.activity {
      color: #10b981;
    }
  </style>
</head>
<body>
  <div class="app-container">
    <!-- 顶部导航栏 -->
    <div class="sticky top-0 z-10 bg-white border-b border-gray-100 px-4 py-3 flex items-center">
      <a href="javascript:history.back()" class="mr-2">
        <i class="fas fa-arrow-left text-lg"></i>
      </a>
      <h1 class="text-lg font-medium flex-1 text-center">消息通知</h1>
      <div class="flex items-center">
        <button id="readAllBtn" class="text-sm text-gray-500">全部已读</button>
      </div>
    </div>
    
    <!-- 标签页 -->
    <div class="px-4 border-b border-gray-200">
      <div class="flex">
        <div class="tab-active px-6 py-3 text-center">
          <span>全部</span>
        </div>
        <div class="px-6 py-3 text-center text-gray-500">
          <span>订单</span>
        </div>
        <div class="px-6 py-3 text-center text-gray-500">
          <span>活动</span>
        </div>
        <div class="px-6 py-3 text-center text-gray-500">
          <span>系统</span>
        </div>
      </div>
    </div>
    
    <!-- 通知列表 -->
    <div class="notification-list">
      <!-- 全部标签页 -->
      <div id="all-tab">
        <!-- 未读通知 -->
        <div class="notification-item unread relative">
          <div class="flex">
            <div class="notification-icon order">
              <i class="fas fa-clipboard-check"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">订单状态更新</h3>
                <span class="text-xs text-gray-400">10分钟前</span>
              </div>
              <p class="text-sm text-gray-600">您的订单 #20230615001 已开始服务，护理师张阿姨已到达指定地点。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item unread relative">
          <div class="flex">
            <div class="notification-icon activity">
              <i class="fas fa-gift"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">活动通知</h3>
                <span class="text-xs text-gray-400">1小时前</span>
              </div>
              <p class="text-sm text-gray-600">恭喜您获得"新人专享"优惠券，价值100元，有效期7天。</p>
            </div>
          </div>
        </div>
        
        <!-- 已读通知 -->
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon system">
              <i class="fas fa-bell"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">系统通知</h3>
                <span class="text-xs text-gray-400">昨天 15:30</span>
              </div>
              <p class="text-sm text-gray-600">邦伴APP已更新至v2.3.1版本，新增家庭成员管理功能，优化用户体验。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon order">
              <i class="fas fa-clipboard-check"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">订单状态更新</h3>
                <span class="text-xs text-gray-400">2天前</span>
              </div>
              <p class="text-sm text-gray-600">您的订单 #20230613002 已完成服务，请对本次服务进行评价。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon activity">
              <i class="fas fa-gift"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">活动通知</h3>
                <span class="text-xs text-gray-400">3天前</span>
              </div>
              <p class="text-sm text-gray-600">端午节特惠活动开始啦！6月20-22日，全场服务8.8折，多重好礼等你来领。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon system">
              <i class="fas fa-bell"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">系统通知</h3>
                <span class="text-xs text-gray-400">5天前</span>
              </div>
              <p class="text-sm text-gray-600">您的账户已完成实名认证，现在可以使用全部功能。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon order">
              <i class="fas fa-clipboard-check"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">订单状态更新</h3>
                <span class="text-xs text-gray-400">6天前</span>
              </div>
              <p class="text-sm text-gray-600">您的订单 #20230610001 已支付成功，将于6月13日开始服务。</p>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 订单标签页 -->
      <div id="order-tab" class="hidden">
        <!-- 未读通知 -->
        <div class="notification-item unread relative">
          <div class="flex">
            <div class="notification-icon order">
              <i class="fas fa-clipboard-check"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">订单状态更新</h3>
                <span class="text-xs text-gray-400">10分钟前</span>
              </div>
              <p class="text-sm text-gray-600">您的订单 #20230615001 已开始服务，护理师张阿姨已到达指定地点。</p>
            </div>
          </div>
        </div>
        
        <!-- 已读通知 -->
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon order">
              <i class="fas fa-clipboard-check"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">订单状态更新</h3>
                <span class="text-xs text-gray-400">2天前</span>
              </div>
              <p class="text-sm text-gray-600">您的订单 #20230613002 已完成服务，请对本次服务进行评价。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon order">
              <i class="fas fa-clipboard-check"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">订单状态更新</h3>
                <span class="text-xs text-gray-400">6天前</span>
              </div>
              <p class="text-sm text-gray-600">您的订单 #20230610001 已支付成功，将于6月13日开始服务。</p>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 活动标签页 -->
      <div id="activity-tab" class="hidden">
        <!-- 未读通知 -->
        <div class="notification-item unread relative">
          <div class="flex">
            <div class="notification-icon activity">
              <i class="fas fa-gift"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">活动通知</h3>
                <span class="text-xs text-gray-400">1小时前</span>
              </div>
              <p class="text-sm text-gray-600">恭喜您获得"新人专享"优惠券，价值100元，有效期7天。</p>
            </div>
          </div>
        </div>
        
        <!-- 已读通知 -->
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon activity">
              <i class="fas fa-gift"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">活动通知</h3>
                <span class="text-xs text-gray-400">3天前</span>
              </div>
              <p class="text-sm text-gray-600">端午节特惠活动开始啦！6月20-22日，全场服务8.8折，多重好礼等你来领。</p>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 系统标签页 -->
      <div id="system-tab" class="hidden">
        <!-- 已读通知 -->
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon system">
              <i class="fas fa-bell"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">系统通知</h3>
                <span class="text-xs text-gray-400">昨天 15:30</span>
              </div>
              <p class="text-sm text-gray-600">邦伴APP已更新至v2.3.1版本，新增家庭成员管理功能，优化用户体验。</p>
            </div>
          </div>
        </div>
        
        <div class="notification-item">
          <div class="flex">
            <div class="notification-icon system">
              <i class="fas fa-bell"></i>
            </div>
            <div class="flex-1">
              <div class="flex justify-between items-start mb-1">
                <h3 class="font-medium text-sm">系统通知</h3>
                <span class="text-xs text-gray-400">5天前</span>
              </div>
              <p class="text-sm text-gray-600">您的账户已完成实名认证，现在可以使用全部功能。</p>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 无通知状态 -->
      <div id="empty-state" class="hidden py-16 text-center">
        <div class="w-20 h-20 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-4">
          <i class="fas fa-bell-slash text-gray-400 text-2xl"></i>
        </div>
        <p class="text-gray-500">暂无通知消息</p>
      </div>
    </div>
    
    <!-- 底部加载更多 -->
    <div class="py-4 text-center text-sm text-gray-500">
      <span>已加载全部消息</span>
    </div>
  </div>

  <script>
    document.addEventListener('DOMContentLoaded', function() {
      // 标签页切换
      const tabs = document.querySelectorAll('.px-4.border-b.border-gray-200 .px-6.py-3');
      const contentDivs = [
        document.getElementById('all-tab'),
        document.getElementById('order-tab'),
        document.getElementById('activity-tab'),
        document.getElementById('system-tab')
      ];
      const emptyState = document.getElementById('empty-state');
      
      tabs.forEach((tab, index) => {
        tab.addEventListener('click', function() {
          // 移除所有标签的激活状态
          tabs.forEach(t => {
            t.classList.remove('tab-active');
            t.classList.add('text-gray-500');
          });
          
          // 激活当前标签
          this.classList.add('tab-active');
          this.classList.remove('text-gray-500');
          
          // 显示对应内容，隐藏其他内容
          contentDivs.forEach((div, i) => {
            if (i === index) {
              div.classList.remove('hidden');
              
              // 检查当前标签页是否有通知
              if (div.querySelectorAll('.notification-item').length === 0) {
                emptyState.classList.remove('hidden');
              } else {
                emptyState.classList.add('hidden');
              }
            } else {
              div.classList.add('hidden');
            }
          });
        });
      });
      
      // 全部已读功能
      const readAllBtn = document.getElementById('readAllBtn');
      readAllBtn.addEventListener('click', function() {
        const unreadItems = document.querySelectorAll('.notification-item.unread');
        unreadItems.forEach(item => {
          item.classList.remove('unread');
        });
      });
      
      // 点击通知项
      const notificationItems = document.querySelectorAll('.notification-item');
      notificationItems.forEach(item => {
        item.addEventListener('click', function() {
          // 标记为已读
          this.classList.remove('unread');
          
          // 这里可以添加跳转到详情页的逻辑
          console.log('查看通知详情');
        });
      });
    });
  </script>
</body>
</html> 